home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / ADSPSecure.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  4.7 KB  |  128 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ADSPSecure.a
  3. ;
  4. ;    Contains:    Secure AppleTalk Data Stream Protocol Interfaces.
  5. ;
  6. ;    Version:    Technology:    AOCE Toolbox 1.02
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__ADSPSECURE__') = 'UNDEFINED' THEN
  21. __ADSPSECURE__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  25.     include 'Events.a'
  26.     ENDIF
  27. ;        include 'Types.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'Quickdraw.a'                                        ;
  30. ;            include 'MixedMode.a'                                    ;
  31. ;            include 'QuickdrawText.a'                                ;
  32. ;        include 'OSUtils.a'                                        ;
  33. ;            include 'Memory.a'                                        ;
  34.  
  35.     IF &TYPE('__NOTIFICATION__') = 'UNDEFINED' THEN
  36.     include 'Notification.a'
  37.     ENDIF
  38.  
  39.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  40.     include 'AppleEvents.a'
  41.     ENDIF
  42. ;        include 'Errors.a'                                            ;
  43. ;        include 'EPPC.a'                                            ;
  44. ;            include 'AppleTalk.a'                                    ;
  45. ;            include 'Files.a'                                        ;
  46. ;            include 'PPCToolbox.a'                                    ;
  47. ;            include 'Processes.a'                                    ;
  48.  
  49.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  50.     include 'Types.a'
  51.     ENDIF
  52.  
  53.     IF &TYPE('__ADSP__') = 'UNDEFINED' THEN
  54.     include 'ADSP.a'
  55.     ENDIF
  56.  
  57.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  58.     include 'Files.a'
  59.     ENDIF
  60.  
  61.     IF &TYPE('__OCE__') = 'UNDEFINED' THEN
  62.     include 'OCE.a'
  63.     ENDIF
  64. ;        include 'Aliases.a'                                        ;
  65. ;        include 'Script.a'                                            ;
  66. ;            include 'IntlResources.a'                                ;
  67.  
  68.     IF &TYPE('__OCEAUTHDIR__') = 'UNDEFINED' THEN
  69.     include 'OCEAuthDir.a'
  70.     ENDIF
  71.  
  72. sdspOpen                        EQU        229
  73.  
  74. ;
  75. ;For secure connections, the eom field of ioParams contains two single-bit flags
  76. ;(instead of a zero/non-zero byte). They are an encrypt flag (see below), and an
  77. ;eom flag.  All other bits in that field should be zero.
  78. ;
  79. ;To write an encrypted message, you must set an encrypt bit in the eom field of
  80. ;the ioParams of your write call. Note: this flag is only checked on the first
  81. ;write of a message (the first write on a connection, or the first write following
  82. ;a write with eom set.
  83. ;
  84. dspEOMBit                        EQU        0                    ; set if EOM at end of write 
  85. dspEncryptBit                    EQU        1                    ; set to encrypt message 
  86.  
  87. dspEOMMask                        EQU        1
  88. dspEncryptMask                    EQU        2
  89.  
  90. sdspWorkSize                    EQU        2048
  91.  
  92. TRSecureParams             RECORD    0
  93. localCID                 ds.w   1        ; offset: $0 (0)        ; local connection id 
  94. remoteCID                 ds.w   1        ; offset: $2 (2)        ; remote connection id 
  95. remoteAddress             ds     AddrBlock ; offset: $4 (4)        ; address of remote end 
  96. filterAddress             ds     AddrBlock ; offset: $8 (8)        ; address filter 
  97. sendSeq                     ds.l   1        ; offset: $C (12)        ; local send sequence number 
  98. sendWindow                 ds.w   1        ; offset: $10 (16)        ; send window size 
  99. recvSeq                     ds.l   1        ; offset: $12 (18)        ; receive sequence number 
  100. attnSendSeq                 ds.l   1        ; offset: $16 (22)        ; attention send sequence number 
  101. attnRecvSeq                 ds.l   1        ; offset: $1A (26)        ; attention receive sequence number 
  102. ocMode                     ds.b   1        ; offset: $1E (30)        ; open connection mode 
  103. ocInterval                 ds.b   1        ; offset: $1F (31)        ; open connection request retry interval 
  104. ocMaximum                 ds.b   1        ; offset: $20 (32)        ; open connection request retry maximum 
  105. secure                     ds.b   1        ; offset: $21 (33)        ;  --> TRUE if session was authenticated 
  106. sessionKey                 ds.l   1        ; offset: $22 (34)        ; <--> encryption key for session 
  107. credentialsSize             ds.l   1        ; offset: $26 (38)        ;  --> length of credentials 
  108. credentials                 ds.l   1        ; offset: $2A (42)        ;  --> pointer to credentials 
  109. workspace                 ds.l   1        ; offset: $2E (46)        ;  --> pointer to workspace for connection
  110. ;                                           align on even boundary and length = sdspWorkSize 
  111. recipient                 ds.l   1        ; offset: $32 (50)        ;  --> identity of recipient (or initiator if active mode 
  112. issueTime                 ds.l   1        ; offset: $36 (54)        ;  --> when credentials were issued 
  113. expiry                     ds.l   1        ; offset: $3A (58)        ;  --> when credentials expiry 
  114. initiator                 ds.l   1        ; offset: $3E (62)        ; <--  RecordID of initiator returned here.
  115. ;                                            Must give appropriate Buffer to hold RecordID
  116. ;                                            (Only for passive or accept mode) 
  117. hasIntermediary             ds.b   1        ; offset: $42 (66)        ; <--  will be set if credentials has an intermediary 
  118. filler1                     ds.b   1        ; offset: $43 (67)
  119. intermediary             ds.l   1        ; offset: $44 (68)        ; <--  RecordID of intermediary returned here.
  120. ;                                            (If intermediary is found in credentials
  121. ;                                            Must give appropriate Buffer to hold RecordID
  122. ;                                            (Only for passive or accept mode) 
  123. sizeof                     EQU *            ; size:   $48 (72)
  124.                         ENDR
  125.  
  126. ; typedef struct TRSecureParams  TRSecureParams
  127.     ENDIF ; __ADSPSECURE__
  128.